This to reduce linking time and have all tests in a single binary.
testing_SOURCES = testing.c
testing_LDADD = $(progs_ldadd)
-TEST_PROGS += liststore
-liststore_SOURCES = liststore.c
-liststore_LDADD = $(progs_ldadd)
-
-TEST_PROGS += treestore
-treestore_SOURCES = treestore.c
-treestore_LDADD = $(progs_ldadd)
+TEST_PROGS += treemodel
+treemodel_SOURCES = treemodel.c liststore.c treestore.c filtermodel.c
+treemodel_LDADD = $(progs_ldadd)
TEST_PROGS += treeview
treeview_SOURCES = treeview.c
textiter_SOURCES = textiter.c
textiter_LDADD = $(progs_ldadd)
-TEST_PROGS += filtermodel
-filtermodel_SOURCES = filtermodel.c
-filtermodel_LDADD = $(progs_ldadd)
-
TEST_PROGS += expander
expander_SOURCES = expander.c
expander_LDADD = $(progs_ldadd)
/* main */
-int
-main (int argc,
- char **argv)
+void
+register_filter_model_tests (void)
{
- gtk_test_init (&argc, &argv, NULL);
-
g_test_add ("/FilterModel/self/verify-test-suite",
FilterTest, NULL,
filter_test_setup,
specific_bug_540201);
g_test_add_func ("/FilterModel/specific/bug-549287",
specific_bug_549287);
-
- return g_test_run ();
}
#include <gtk/gtk.h>
+#include "treemodel.h"
+
static inline gboolean
iters_equal (GtkTreeIter *a,
GtkTreeIter *b)
/* main */
-int
-main (int argc,
- char **argv)
+void
+register_list_store_tests (void)
{
- gtk_test_init (&argc, &argv, NULL);
-
/* insertion */
g_test_add_func ("/list-store/insert-high-values",
list_store_test_insert_high_values);
g_test_add ("/list-store/iter-parent-invalid", ListStore, NULL,
list_store_setup, list_store_test_iter_parent_invalid,
list_store_teardown);
-
- return g_test_run ();
}
--- /dev/null
+/* Main wrapper for TreeModel test suite.
+ * Copyright (C) 2011 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include "treemodel.h"
+
+int
+main (int argc,
+ char **argv)
+{
+ gtk_test_init (&argc, &argv, NULL);
+
+ register_list_store_tests ();
+ register_tree_store_tests ();
+ register_filter_model_tests ();
+
+ return g_test_run ();
+}
--- /dev/null
+/* Main wrapper for TreeModel test suite.
+ * Copyright (C) 2011 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+void register_list_store_tests ();
+void register_tree_store_tests ();
+void register_filter_model_tests ();
/* main */
-int
-main (int argc,
- char **argv)
+void
+register_tree_store_tests (void)
{
- gtk_test_init (&argc, &argv, NULL);
-
/* insertion */
g_test_add_func ("/tree-store/insert-high-values",
tree_store_test_insert_high_values);
g_test_add ("/tree-store/iter-parent-invalid", TreeStore, NULL,
tree_store_setup, tree_store_test_iter_parent_invalid,
tree_store_teardown);
-
- return g_test_run ();
}